package common.businesslog;

import models.AsyncFlowBusinessLogEntity;
import models.AsyncFlowData;

import java.time.LocalDateTime;

/**
 * 业务日志
 */
public class AsyncFlowBusinessLog {
    /**
     * 添加业务日志
     */
    public static void addBusinessLog(AsyncFlowData orderFlowData, String logInfo, boolean mustRecord){
        AsyncFlowBusinessLogEntity asyncBusinessLogEntity=new AsyncFlowBusinessLogEntity();
        asyncBusinessLogEntity.setLogInfo(logInfo);
        asyncBusinessLogEntity.setLocalDateTime(LocalDateTime.now());
        asyncBusinessLogEntity.setMustRecord(mustRecord);
        orderFlowData.getAsyncBusinessLogEntityList().add(asyncBusinessLogEntity);
    }
}
